*********************************************************************************
*                                                                               *
*            Election Frequency - Preparing Varieties of Democracy  	        *
*                                                                               *
*                         		                            					*
*                                                                               *
*********************************************************************************

global beg_path `"C:\Users\JohnSmith\Dropbox\Replication_EF\"'  
 
use `"${beg_path}Data\Analysis 1\Control Variables\V-Dem-CY-Full+Others-v9.dta"', clear

gen GDP_pc = e_migdppc

encode country_name, gen(temp1)
fre temp1, all

gen Country = . 
replace Country = 	1	if temp1 ==	44	 //	DK
replace Country = 	2	if temp1 ==	167	 //	ES
replace Country = 	3	if temp1 ==	55	 //	FI
replace Country = 	4	if temp1 ==	56   //	FR
replace Country = 	5	if temp1 ==	62 	 //	GR
replace Country = 	6	if temp1 ==	80	 //	IE
replace Country = 	7	if temp1 ==	75	 //	IS
replace Country = 	8	if temp1 ==	106	 //	MT
replace Country = 	9	if temp1 ==	120	 //	NL
replace Country = 	10	if temp1 ==	126	 //	NO
replace Country = 	11	if temp1 ==	142	 //	PT
replace Country = 	12	if temp1 ==	172	 //	SE
replace Country =  	21  if temp1 ==	24	 //	Bulgaria
replace Country =  	22  if temp1 ==	42	 //	Czech Republic 
replace Country =  	23  if temp1 ==	52	 //	Estonia
replace Country =  	24  if temp1 ==	74	 //	Hungary
replace Country =  	25  if temp1 ==	93	 //	Latvia
replace Country =  	26  if temp1 ==	98	 //	Lithuania
replace Country =  	27  if temp1 ==	141	 //	Poland
replace Country =  	28  if temp1 ==	146	 //	Romania
replace Country =  	29  if temp1 ==	158  //	Slovakia
replace Country =  	30  if temp1 ==	159	 //	Slovenia

keep if Country !=.
rename year Year
keep Country Year GDP_pc 

save  `"${beg_path}Data\Analysis 1\Control Variables\VOD_to_merge.dta"', replace
 